/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/appr-contract/zdrwcj/pageFQ',
    method: 'get',
    params: query
  })
}

export function fetchListZp(query) {
    return request({
      url: '/appr-contract/zdrwcj/pageZp',
      method: 'get',
      params: query
    })
}

export function fetchListPj(query) {
    return request({
        url: '/appr-contract/zdrwrenwufaqidetail/pagePj',
        method: 'get',
        params: query
    })
}

export function fetchListHz(query) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/pageHz',
      method: 'get',
      params: query
  })
}

export function fetchListHzCk(query) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/pageHzCk',
      method: 'get',
      params: query
  })
}

export function fetchListQt(query) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/pageQt',
      method: 'get',
      params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail',
    method: 'put',
    data: obj
  })
}

export function sent(obj) {
    return request({
        url: '/appr-contract/zdrwrenwufaqidetail/sent',
        method: 'post',
        data: obj
    })
}
export function checkIsOne(obj) {
  return request({
      url: '/appr-contract/zdrwcj/checkIsOne',
      method: 'post',
      data: obj
  })
}
export function commitAll(obj) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/commitAll',
      method: 'post',
      data: obj
  })
}
export function downloadFile(obj) {
  return request({
      url: '/appr-contract/zdrwscore/downloadFile',
      method: 'post',
      data: obj,
      responseType: "blob"
  })
}

export function proceAll(obj) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/proceAll',
      method: 'post',
      data: obj
  })
}

export function passAll(obj) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/passAll',
      method: 'post',
      data: obj
  })
}

export function getScore(query) {
    return request({
        url: '/appr-contract/zdrwrenwufaqidetail/getScore',
        method: 'get',
        params: query
    })
}

export function saveScore(query) {
    return request({
        url: '/appr-contract/zdrwscore/saveScore',
        method: 'post',
        data: query
    })
}

export function getScorePj(query) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/getScorePj',
      method: 'get',
      params: query
  })
}

export function saveScorePj(query) {
  return request({
      url: '/appr-contract/zdrwscore/saveScorePj',
      method: 'post',
      data: query
  })
}

export function score(query) {
  return request({
      url: '/appr-contract/zdrwscore/score',
      method: 'post',
      data: query
  })
}

export function tibao(obj) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail/tibao',
    method: 'post',
    data: obj
  })
}

export function subAll(obj) {
  return request({
      url: '/appr-contract/zdrwrenwufaqidetail/subAll',
      method: 'post',
      data: obj
  })
}

export function theend(obj) {
  return request({
    url: '/appr-contract/zdrwrenwufaqidetail/end',
    method: 'post',
    data: obj
  })
}
// 查看领导审批意见
export function getLdshOpinions(obj) {
  return request({
    url: '/appr-contract/zdrwcj/getLdshOpinions',
    method: 'get',
    params: obj
  })
}
// 结果汇总结束
export function endAll(obj) {
  return request({
    url: '/appr-contract/zdrwcj/endAll',
    method: 'post',
    data: obj
  })
}